package com.irdstudio.efp.console.service.dao;

import java.util.List;

import com.irdstudio.efp.console.service.domain.SRole;
import com.irdstudio.efp.console.service.vo.SRoleVO;

/**
 * <p>DAO interface:系统角色表				<p>
 * @author chenqm1
 * @date 2018-05-03
 */
public interface SRoleDao {
	
	public int insertSRole(SRole sRole);
	
	public int deleteByPk(SRole sRole);
	/**
	 * 删除角色对应资源操作信息
	 * @param sRole
	 * @return 
	 */
	public int deleteRoleRescRule(SRole sRole);
	/**
	 * 删除角色对应数据资源权限
	 * @param sRole
	 * @return
	 */
	public int deleteRoleDataRule(SRole sRole);
	/**
	 * 删除角色关联的用户信息
	 * @param sRole
	 * @return
	 */
	public int deleteRoleBindUser(SRole sRole);
	/**
	 * 查询角色是否关联用户信息
	 * @param sRole
	 * @return
	 */
	public int queryRoleBindUserTotal(SRole sRole);
	
	public int updateByPk(SRole sRole);
	
	public SRole queryByPk(SRole sRole);
	
	public List<SRole> queryAllOwnerByPage(SRole sRole);
	
	public List<SRole> queryAllCurrOrgByPage(SRole sRole);
	
	public List<SRole> queryAllCurrDownOrgByPage(SRole sRole);
	/**
	 * 查询生效的当前登录用户所属机构及下属机构的所有角色数据
	 * @param sRole
	 * @return
	 */
	public List<SRole> queryRoleAll(SRole sRole);
	
	public List<SRole> queryRoleByLcAndStByPage(SRole sRole);
	/**
	 * 查询当前登录法人机构所有的角色
	 * @param sRole
	 * @return
	 */
	public List<SRole> queryRoleAllByLoginLeage(SRole sRole);

	/**
	 * 查询当前登录法人机构所有的角色
	 * 
	 * @param sRole
	 * @return
	 */
	public List<SRole> queryRoleUserAllByPage(SRole sRole);
	
	/**
	  * 不分页数据权限控制的信息查询
	  * @param sRole
	  * @return
	  * @author qiuyf
	  * @since 2019年2月14日 下午7:55:27
	  * @version 1.0
	 */
	public List<SRole> queryAllOwnerNotPage(SRole sRole);
	public List<SRole> queryAllCurrOrgNotPage(SRole sRole);
	public List<SRole> queryAllCurrDownOrgNotPage(SRole sRole);

	public List<SRole> queryAllByOrgs(SRole sRole);

	public List<SRole> queryAllByConditions(SRole sRole);

	public List<SRole> queryAllValidRole(SRole sRole);

	public List<SRole> queryRoleAllNotR0000(SRole sRole);

}